using sly.lexer;

namespace LuckyLang;

[Lexer(IndentationAWare = true)]
public enum Lexer
{
    #region Keyword 1~99

    [Keyword("if")]     IF     = 1,
    [Keyword("for")]    FOR    = 2,
    [Keyword("while")]  WHILE  = 3,
    [Keyword("def")]    DEF    = 4,
    [Keyword("true")]   TRUE   = 5,
    [Keyword("false")]  FALSE  = 6,
    [Keyword("elif")]   ELIF   = 7,
    [Keyword("else")]   ELSE   = 8,
    [Keyword("return")] RETUEN = 9,
    [Keyword("import")] IMPROT = 10,
    [Keyword("class")]  CLASS  = 11,
    [Keyword("import")] IMPORT = 12,
    [Keyword("pass")]   PASS   = 13,

    #endregion

    #region Sugar 100~199

    [Sugar("=")]  SET       = 100,
    [Sugar("==")] EQUALS    = 101,
    [Sugar("<")]  LESSER    = 102,
    [Sugar(">")]  GREATER   = 103,
    [Sugar("<=")] LESS_EQ   = 104,
    [Sugar(">=")] GR_EQ     = 105,
    [Sugar("||")] OR        = 106,
    [Sugar("&&")] AND       = 107,
    [Sugar("!")]  NOT       = 108,
    [Sugar("(")]  LPAREN    = 109,
    [Sugar(")")]  RPAREN    = 110,
    [Sugar("[")]  L_BRACKET = 111,
    [Sugar("]")]  R_BRACKET = 112,
    [Sugar("!=")] DIFFERENT = 113,
    [Sugar(".")]  DOT       = 114,
    [Sugar("+")]  PLUS      = 115,
    [Sugar("-")]  MINUS     = 116,
    [Sugar("*")]  TIMES     = 117,
    [Sugar("/")]  DIVIDE    = 118,

    #endregion

    #region VA 200~299

    [AlphaNumId] IDENTIFIER = 200,
    [String]     STRING     = 201,
    [Int]        INT        = 202,
    [Double]     DOUBLE     = 203,

    #endregion

    #region Comment

    [Comment("//","/*","*/")] COMMENT = 1000,

    #endregion
}